// common ajax setting for all
$.ajaxSetup({
    dataType : "json",
    type : "POST",
    cache: false,
    timeout : 30000
})

$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
    console.log(thrownError);
});


$(document).ajaxComplete(function(event, XMLHttpRequest, ajaxSettings) {
   // console.log(ajaxSettings);
});